<?php

namespace Index\ViewModel;

use Think\Model\ViewModel;

Class AdminViewModel extends ViewModel {

    protected $connection = 'DB';   //连接数据库
    protected $viewFields = array(
	//管理员表
	'chat_admin' => array('id', 'role_id','fxcode', 'username', 'password', 'name', 'phone', 'state', 'ctime', 'app_flag', '_type' => 'left'),
	//管理员角色表
	'chat_adminrole' => array('level_first_id', 'level_second_id', 'level_third_id', 'name' => 'role_name', 'state' => 'role_state', 'level' => 'role_level', 'ctime' => 'role_ctime', '_on' => 'chat_admin.role_id=chat_adminrole.id'));

}
